mysqld_multi stop 不能停掉mysql

        使用mysqld_multi start 启动了多个mysql实例,但是mysqld_multi stop 却不能停止,为啥呢?因为还没有授权呢。

1
/usr/local/mysql/bin/mysqld_multi stop

        但是默认是停不掉的,需要做一个授权

1
grant shutdown on *.* to 'username'@'localhost' identified by 'password'

        另外还需要在my.cnf配置文件中加上:

1
2
3
4
5
[mysqld_multi]
mysqld = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin
user = username
password = password